<template>
  <div style="width: 100%">
    <el-date-picker v-model="dateTime" style="width: 100%" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" @change="changeTime" />
  </div>
</template>

<script>
export default {
  props: {
    // eslint-disable-next-line vue/require-default-prop
    label: String
  },
  data() {
    return {
      dateTime: this.value
    }
  },
  methods: {
    changeTime(val) {
      this.$emit('dataTime', val)
    }
  }
}
</script>
